const mysql = require('mysql2');

// 创建连接池
const pool = mysql.createPool({
    host: 'localhost',
    port:3306,
    user: 'root',
    password: 'chen1234',
    database: 'rent-car',
    //限制连接池的个数
    connectionLimit:1
  });

const dbQuery = pool.promise();

module.exports = dbQuery;